
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>TypeScript 1.5 · TypeScript Handbook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="Patrick Zhong">
        
        
    
    <link rel="stylesheet" href="../../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="TypeScript 1.4.html" />
    
    
    <link rel="prev" href="TypeScript 1.6.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../../">
            
                <a href="../../">
            
                    
                    Introduction
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../handbook/tutorials/">
            
                <a href="../handbook/tutorials/">
            
                    
                    快速上手
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="../handbook/tutorials/TypeScript in 5 minutes.html">
            
                <a href="../handbook/tutorials/TypeScript in 5 minutes.html">
            
                    
                    5分钟了解TypeScript
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="../handbook/tutorials/ASP.NET Core.html">
            
                <a href="../handbook/tutorials/ASP.NET Core.html">
            
                    
                    ASP.NET Core
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3" data-path="../handbook/tutorials/ASP.NET 4.html">
            
                <a href="../handbook/tutorials/ASP.NET 4.html">
            
                    
                    ASP.NET 4
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.4" data-path="../handbook/tutorials/Gulp.html">
            
                <a href="../handbook/tutorials/Gulp.html">
            
                    
                    Gulp
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.5" data-path="../handbook/tutorials/Knockout.html">
            
                <a href="../handbook/tutorials/Knockout.html">
            
                    
                    Knockout.js
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.6" data-path="../handbook/tutorials/React & Webpack.html">
            
                <a href="../handbook/tutorials/React & Webpack.html">
            
                    
                    React与webpack
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.7" data-path="../handbook/tutorials/React.html">
            
                <a href="../handbook/tutorials/React.html">
            
                    
                    React
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.8" data-path="../handbook/tutorials/Angular 2.html">
            
                <a href="../handbook/tutorials/Angular 2.html">
            
                    
                    Angular 2
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.9" data-path="../handbook/tutorials/Migrating from JavaScript.html">
            
                <a href="../handbook/tutorials/Migrating from JavaScript.html">
            
                    
                    从JavaScript迁移到TypeScript
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../handbook/">
            
                <a href="../handbook/">
            
                    
                    手册
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="../handbook/Basic Types.html">
            
                <a href="../handbook/Basic Types.html">
            
                    
                    基础类型
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="../handbook/Variable Declarations.html">
            
                <a href="../handbook/Variable Declarations.html">
            
                    
                    变量声明
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="../handbook/Interfaces.html">
            
                <a href="../handbook/Interfaces.html">
            
                    
                    接口
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.4" data-path="../handbook/Classes.html">
            
                <a href="../handbook/Classes.html">
            
                    
                    类
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.5" data-path="../handbook/Functions.html">
            
                <a href="../handbook/Functions.html">
            
                    
                    函数
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.6" data-path="../handbook/Generics.html">
            
                <a href="../handbook/Generics.html">
            
                    
                    泛型
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.7" data-path="../handbook/Enums.html">
            
                <a href="../handbook/Enums.html">
            
                    
                    枚举
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.8" data-path="../handbook/Type Inference.html">
            
                <a href="../handbook/Type Inference.html">
            
                    
                    类型推论
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.9" data-path="../handbook/Type Compatibility.html">
            
                <a href="../handbook/Type Compatibility.html">
            
                    
                    类型兼容性
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.10" data-path="../handbook/Advanced Types.html">
            
                <a href="../handbook/Advanced Types.html">
            
                    
                    高级类型
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.11" data-path="../handbook/Utilit Types.md">
            
                <span>
            
                    
                    实用工具类型
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.12" data-path="../handbook/Symbols.html">
            
                <a href="../handbook/Symbols.html">
            
                    
                    Symbols
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.13" data-path="../handbook/Iterators and Generators.html">
            
                <a href="../handbook/Iterators and Generators.html">
            
                    
                    Iterators 和 Generators
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.14" data-path="../handbook/Modules.html">
            
                <a href="../handbook/Modules.html">
            
                    
                    模块
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.15" data-path="../handbook/Namespaces.html">
            
                <a href="../handbook/Namespaces.html">
            
                    
                    命名空间
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.16" data-path="../handbook/Namespaces and Modules.html">
            
                <a href="../handbook/Namespaces and Modules.html">
            
                    
                    命名空间和模块
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.17" data-path="../handbook/Module Resolution.html">
            
                <a href="../handbook/Module Resolution.html">
            
                    
                    模块解析
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.18" data-path="../handbook/Declaration Merging.html">
            
                <a href="../handbook/Declaration Merging.html">
            
                    
                    声明合并
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.19" data-path="../handbook/Writing Definition Files.html">
            
                <a href="../handbook/Writing Definition Files.html">
            
                    
                    书写.d.ts文件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.20" data-path="../handbook/JSX.html">
            
                <a href="../handbook/JSX.html">
            
                    
                    JSX
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.21" data-path="../handbook/Decorators.html">
            
                <a href="../handbook/Decorators.html">
            
                    
                    Decorators
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.22" data-path="../handbook/Mixins.html">
            
                <a href="../handbook/Mixins.html">
            
                    
                    混入
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.23" data-path="../handbook/Triple-Slash Directives.html">
            
                <a href="../handbook/Triple-Slash Directives.html">
            
                    
                    三斜线指令
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.24" data-path="../handbook/Type Checking JavaScript Files.html">
            
                <a href="../handbook/Type Checking JavaScript Files.html">
            
                    
                    JavaScript文件里的类型检查
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="../handbook/declaration files/Introduction.html">
            
                <a href="../handbook/declaration files/Introduction.html">
            
                    
                    如何书写声明文件
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="../handbook/declaration files/Library Structures.html">
            
                <a href="../handbook/declaration files/Library Structures.html">
            
                    
                    结构
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="../handbook/declaration files/Do's and Don'ts.html">
            
                <a href="../handbook/declaration files/Do's and Don'ts.html">
            
                    
                    规范
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="../handbook/declaration files/By Example.html">
            
                <a href="../handbook/declaration files/By Example.html">
            
                    
                    举例
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.4" data-path="../handbook/declaration files/Deep Dive.html">
            
                <a href="../handbook/declaration files/Deep Dive.html">
            
                    
                    深入
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5" data-path="../handbook/declaration files/Publishing.html">
            
                <a href="../handbook/declaration files/Publishing.html">
            
                    
                    发布
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.6" data-path="../handbook/declaration files/Consumption.html">
            
                <a href="../handbook/declaration files/Consumption.html">
            
                    
                    使用
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="../handbook/tsconfig.json.html">
            
                <a href="../handbook/tsconfig.json.html">
            
                    
                    工程配置
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="../handbook/tsconfig.json.html">
            
                <a href="../handbook/tsconfig.json.html">
            
                    
                    tsconfig.json
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2" data-path="../handbook/Project References.html">
            
                <a href="../handbook/Project References.html">
            
                    
                    工程引用
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.3" data-path="../handbook/Typings for NPM Packages.html">
            
                <a href="../handbook/Typings for NPM Packages.html">
            
                    
                    NPM包的类型
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.4" data-path="../handbook/Compiler Options.html">
            
                <a href="../handbook/Compiler Options.html">
            
                    
                    编译选项
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.5" data-path="../handbook/Configuring Watch.html">
            
                <a href="../handbook/Configuring Watch.html">
            
                    
                    配置 Watch
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.6" data-path="../handbook/Compiler Options in MSBuild.html">
            
                <a href="../handbook/Compiler Options in MSBuild.html">
            
                    
                    在MSBuild里使用编译选项
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.7" data-path="../handbook/Integrating with Build Tools.html">
            
                <a href="../handbook/Integrating with Build Tools.html">
            
                    
                    与其它构建工具整合
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.8" data-path="../handbook/Nightly Builds.html">
            
                <a href="../handbook/Nightly Builds.html">
            
                    
                    使用TypeScript的每日构建版本
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="../wiki/">
            
                <a href="../wiki/">
            
                    
                    Wiki
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1" data-path="../wiki/this-in-TypeScript.html">
            
                <a href="../wiki/this-in-TypeScript.html">
            
                    
                    TypeScript里的this
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2" data-path="../wiki/coding_guidelines.html">
            
                <a href="../wiki/coding_guidelines.html">
            
                    
                    编码规范
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.3" data-path="../wiki/Common Errors.html">
            
                <a href="../wiki/Common Errors.html">
            
                    
                    常见编译错误
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.4" data-path="../wiki/TypeScript-Editor-Support.html">
            
                <a href="../wiki/TypeScript-Editor-Support.html">
            
                    
                    支持TypeScript的编辑器
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.5" data-path="../wiki/Using-TypeScript-With-ASP.NET-5.html">
            
                <a href="../wiki/Using-TypeScript-With-ASP.NET-5.html">
            
                    
                    结合ASP.NET v5使用TypeScript
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.6" data-path="../wiki/Architectural-Overview.html">
            
                <a href="../wiki/Architectural-Overview.html">
            
                    
                    架构概述
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.7" data-path="../wiki/Roadmap.html">
            
                <a href="../wiki/Roadmap.html">
            
                    
                    发展路线图
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="./">
            
                <a href="./">
            
                    
                    新增功能
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.1" data-path="TypeScript 3.1.html">
            
                <a href="TypeScript 3.1.html">
            
                    
                    TypeScript 3.1
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2" data-path="TypeScript 3.0.html">
            
                <a href="TypeScript 3.0.html">
            
                    
                    TypeScript 3.0
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3" data-path="TypeScript 2.9.html">
            
                <a href="TypeScript 2.9.html">
            
                    
                    TypeScript 2.9
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.4" data-path="TypeScript 2.8.html">
            
                <a href="TypeScript 2.8.html">
            
                    
                    TypeScript 2.8
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.5" data-path="TypeScript 2.7.html">
            
                <a href="TypeScript 2.7.html">
            
                    
                    TypeScript 2.7
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.6" data-path="TypeScript 2.6.html">
            
                <a href="TypeScript 2.6.html">
            
                    
                    TypeScript 2.6
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.7" data-path="TypeScript 2.5.html">
            
                <a href="TypeScript 2.5.html">
            
                    
                    TypeScript 2.5
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.8" data-path="TypeScript 2.4.html">
            
                <a href="TypeScript 2.4.html">
            
                    
                    TypeScript 2.4
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.9" data-path="TypeScript 2.3.html">
            
                <a href="TypeScript 2.3.html">
            
                    
                    TypeScript 2.3
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.10" data-path="TypeScript 2.2.html">
            
                <a href="TypeScript 2.2.html">
            
                    
                    TypeScript 2.2
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.11" data-path="TypeScript 2.1.html">
            
                <a href="TypeScript 2.1.html">
            
                    
                    TypeScript 2.1
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.12" data-path="TypeScript 2.0.html">
            
                <a href="TypeScript 2.0.html">
            
                    
                    TypeScript 2.0
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.13" data-path="TypeScript 1.8.html">
            
                <a href="TypeScript 1.8.html">
            
                    
                    TypeScript 1.8
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.14" data-path="TypeScript 1.7.html">
            
                <a href="TypeScript 1.7.html">
            
                    
                    TypeScript 1.7
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.15" data-path="TypeScript 1.6.html">
            
                <a href="TypeScript 1.6.html">
            
                    
                    TypeScript 1.6
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.7.16" data-path="TypeScript 1.5.html">
            
                <a href="TypeScript 1.5.html">
            
                    
                    TypeScript 1.5
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.17" data-path="TypeScript 1.4.html">
            
                <a href="TypeScript 1.4.html">
            
                    
                    TypeScript 1.4
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.18" data-path="TypeScript 1.3.html">
            
                <a href="TypeScript 1.3.html">
            
                    
                    TypeScript 1.3
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.19" data-path="TypeScript 1.1.html">
            
                <a href="TypeScript 1.1.html">
            
                    
                    TypeScript 1.1
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="../breaking-changes/breaking-changes.html">
            
                <a href="../breaking-changes/breaking-changes.html">
            
                    
                    Breaking Changes
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.8.1" data-path="../breaking-changes/TypeScript 2.4.html">
            
                <a href="../breaking-changes/TypeScript 2.4.html">
            
                    
                    TypeScript 2.4
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.2" data-path="../breaking-changes/TypeScript 2.3.html">
            
                <a href="../breaking-changes/TypeScript 2.3.html">
            
                    
                    TypeScript 2.3
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.3" data-path="../breaking-changes/TypeScript 2.2.html">
            
                <a href="../breaking-changes/TypeScript 2.2.html">
            
                    
                    TypeScript 2.2
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.4" data-path="../breaking-changes/TypeScript 2.1.html">
            
                <a href="../breaking-changes/TypeScript 2.1.html">
            
                    
                    TypeScript 2.1
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.5" data-path="../breaking-changes/TypeScript 2.0.html">
            
                <a href="../breaking-changes/TypeScript 2.0.html">
            
                    
                    TypeScript 2.0
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.6" data-path="../breaking-changes/TypeScript 1.8.html">
            
                <a href="../breaking-changes/TypeScript 1.8.html">
            
                    
                    TypeScript 1.8
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.7" data-path="../breaking-changes/TypeScript 1.7.html">
            
                <a href="../breaking-changes/TypeScript 1.7.html">
            
                    
                    TypeScript 1.7
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.8" data-path="../breaking-changes/TypeScript 1.6.html">
            
                <a href="../breaking-changes/TypeScript 1.6.html">
            
                    
                    TypeScript 1.6
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.9" data-path="../breaking-changes/TypeScript 1.5.html">
            
                <a href="../breaking-changes/TypeScript 1.5.html">
            
                    
                    TypeScript 1.5
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.10" data-path="../breaking-changes/TypeScript 1.4.html">
            
                <a href="../breaking-changes/TypeScript 1.4.html">
            
                    
                    TypeScript 1.4
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本书使用 GitBook 发布
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../.." >TypeScript 1.5</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="typescript-15">TypeScript 1.5</h1>
<h2 id="es6-&#x6A21;&#x5757;">ES6 &#x6A21;&#x5757;</h2>
<p>TypeScript 1.5 &#x652F;&#x6301; ECMAScript 6 (ES6) &#x6A21;&#x5757;. ES6 &#x6A21;&#x5757;&#x53EF;&#x4EE5;&#x770B;&#x505A;&#x4E4B;&#x524D; TypeScript &#x7684;&#x5916;&#x90E8;&#x6A21;&#x5757;&#x6362;&#x4E0A;&#x4E86;&#x65B0;&#x7684;&#x8BED;&#x6CD5;: ES6 &#x6A21;&#x5757;&#x662F;&#x5206;&#x5F00;&#x52A0;&#x8F7D;&#x7684;&#x6E90;&#x6587;&#x4EF6;, &#x8FD9;&#x4E9B;&#x6587;&#x4EF6;&#x8FD8;&#x53EF;&#x80FD;&#x5F15;&#x5165;&#x5176;&#x4ED6;&#x6A21;&#x5757;, &#x5E76;&#x4E14;&#x5BFC;&#x51FA;&#x90E8;&#x5206;&#x4F9B;&#x5916;&#x90E8;&#x53EF;&#x8BBF;&#x95EE;. ES6 &#x6A21;&#x5757;&#x65B0;&#x589E;&#x4E86;&#x51E0;&#x79CD;&#x5BFC;&#x5165;&#x548C;&#x5BFC;&#x51FA;&#x58F0;&#x660E;. &#x6211;&#x4EEC;&#x5EFA;&#x8BAE;&#x4F7F;&#x7528; TypeScript &#x5F00;&#x53D1;&#x7684;&#x5E93;&#x548C;&#x5E94;&#x7528;&#x80FD;&#x591F;&#x66F4;&#x65B0;&#x5230;&#x65B0;&#x7684;&#x8BED;&#x6CD5;, &#x4F46;&#x4E0D;&#x505A;&#x5F3A;&#x5236;&#x8981;&#x6C42;. &#x65B0;&#x7684; ES6 &#x6A21;&#x5757;&#x8BED;&#x6CD5;&#x548C; TypeScript &#x539F;&#x6765;&#x7684;&#x5185;&#x90E8;&#x548C;&#x5916;&#x90E8;&#x6A21;&#x5757;&#x7ED3;&#x6784;&#x540C;&#x65F6;&#x88AB;&#x652F;&#x6301;, &#x5982;&#x679C;&#x9700;&#x8981;&#x4E5F;&#x53EF;&#x4EE5;&#x6DF7;&#x5408;&#x4F7F;&#x7528;.</p>
<h3 id="&#x5BFC;&#x51FA;&#x58F0;&#x660E;">&#x5BFC;&#x51FA;&#x58F0;&#x660E;</h3>
<p>&#x4F5C;&#x4E3A; TypeScript &#x5DF2;&#x6709;&#x7684; <code>export</code> &#x524D;&#x7F00;&#x652F;&#x6301;, &#x6A21;&#x5757;&#x6210;&#x5458;&#x4E5F;&#x53EF;&#x4EE5;&#x4F7F;&#x7528;&#x5355;&#x72EC;&#x5BFC;&#x51FA;&#x7684;&#x58F0;&#x660E;&#x5BFC;&#x51FA;, &#x5982;&#x679C;&#x9700;&#x8981;, <code>as</code> &#x8BED;&#x53E5;&#x53EF;&#x4EE5;&#x6307;&#x5B9A;&#x4E0D;&#x540C;&#x7684;&#x5BFC;&#x51FA;&#x540D;&#x79F0;.</p>
<pre><code class="lang-ts"><span class="hljs-keyword">interface</span> Stream { ... }
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">writeToStream</span>(<span class="hljs-params">stream: Stream, data: <span class="hljs-built_in">string</span></span>) </span>{ ... }
<span class="hljs-keyword">export</span> { Stream, writeToStream as write };  <span class="hljs-comment">// writeToStream &#x5BFC;&#x51FA;&#x4E3A; write</span>
</code></pre>
<p>&#x5F15;&#x5165;&#x58F0;&#x660E;&#x4E5F;&#x53EF;&#x4EE5;&#x4F7F;&#x7528; <code>as</code> &#x8BED;&#x53E5;&#x6765;&#x6307;&#x5B9A;&#x4E00;&#x4E2A;&#x4E0D;&#x540C;&#x7684;&#x5BFC;&#x5165;&#x540D;&#x79F0;. &#x6BD4;&#x5982;:</p>
<pre><code class="lang-ts"><span class="hljs-keyword">import</span> { read, write, standardOutput as stdout } from <span class="hljs-string">&quot;./inout&quot;</span>;
<span class="hljs-keyword">var</span> s = read(stdout);
write(stdout, s);
</code></pre>
<p>&#x4F5C;&#x4E3A;&#x5355;&#x72EC;&#x5BFC;&#x5165;&#x7684;&#x5019;&#x9009;&#x9879;, &#x547D;&#x540D;&#x7A7A;&#x95F4;&#x5BFC;&#x5165;&#x53EF;&#x4EE5;&#x5BFC;&#x5165;&#x6574;&#x4E2A;&#x6A21;&#x5757;:</p>
<pre><code class="lang-ts"><span class="hljs-keyword">import</span> * as io from <span class="hljs-string">&quot;./inout&quot;</span>;
<span class="hljs-keyword">var</span> s = io.read(io.standardOutput);
io.write(io.standardOutput, s);
</code></pre>
<h2 id="&#x91CD;&#x65B0;&#x5BFC;&#x51FA;">&#x91CD;&#x65B0;&#x5BFC;&#x51FA;</h2>
<p>&#x4F7F;&#x7528; <code>from</code> &#x8BED;&#x53E5;&#x4E00;&#x4E2A;&#x6A21;&#x5757;&#x53EF;&#x4EE5;&#x590D;&#x5236;&#x6307;&#x5B9A;&#x6A21;&#x5757;&#x7684;&#x5BFC;&#x51FA;&#x9879;&#x5230;&#x5F53;&#x524D;&#x6A21;&#x5757;, &#x800C;&#x65E0;&#x9700;&#x521B;&#x5EFA;&#x672C;&#x5730;&#x540D;&#x79F0;.</p>
<pre><code class="lang-ts"><span class="hljs-keyword">export</span> { read, write, standardOutput as stdout } from <span class="hljs-string">&quot;./inout&quot;</span>;
</code></pre>
<p><code>export *</code> &#x53EF;&#x4EE5;&#x7528;&#x6765;&#x91CD;&#x65B0;&#x5BFC;&#x51FA;&#x53E6;&#x4E00;&#x4E2A;&#x6A21;&#x5757;&#x7684;&#x6240;&#x6709;&#x5BFC;&#x51FA;&#x9879;. &#x5728;&#x521B;&#x5EFA;&#x4E00;&#x4E2A;&#x805A;&#x5408;&#x4E86;&#x5176;&#x4ED6;&#x51E0;&#x4E2A;&#x6A21;&#x5757;&#x5BFC;&#x51FA;&#x9879;&#x7684;&#x6A21;&#x5757;&#x65F6;&#x5F88;&#x65B9;&#x4FBF;.</p>
<pre><code class="lang-ts"><span class="hljs-keyword">export</span> <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">transform</span>(<span class="hljs-params">s: <span class="hljs-built_in">string</span></span>): <span class="hljs-title">string</span> </span>{ ... }
<span class="hljs-keyword">export</span> * from <span class="hljs-string">&quot;./mod1&quot;</span>;
<span class="hljs-keyword">export</span> * from <span class="hljs-string">&quot;./mod2&quot;</span>;
</code></pre>
<h3 id="&#x9ED8;&#x8BA4;&#x5BFC;&#x51FA;&#x9879;">&#x9ED8;&#x8BA4;&#x5BFC;&#x51FA;&#x9879;</h3>
<p>&#x4E00;&#x4E2A; export default &#x58F0;&#x660E;&#x8868;&#x793A;&#x4E00;&#x4E2A;&#x8868;&#x8FBE;&#x5F0F;&#x662F;&#x8FD9;&#x4E2A;&#x6A21;&#x5757;&#x7684;&#x9ED8;&#x8BA4;&#x5BFC;&#x51FA;&#x9879;.</p>
<pre><code class="lang-ts"><span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> <span class="hljs-keyword">class</span> Greeter {
    sayHello() {
        <span class="hljs-built_in">console</span>.log(<span class="hljs-string">&quot;Greetings!&quot;</span>);
    }
}
</code></pre>
<p>&#x5BF9;&#x5E94;&#x7684;&#x53EF;&#x4EE5;&#x4F7F;&#x7528;&#x9ED8;&#x8BA4;&#x5BFC;&#x5165;:</p>
<pre><code class="lang-ts"><span class="hljs-keyword">import</span> Greeter from <span class="hljs-string">&quot;./greeter&quot;</span>;
<span class="hljs-keyword">var</span> g = <span class="hljs-keyword">new</span> Greeter();
g.sayHello();
</code></pre>
<h3 id="&#x65E0;&#x5BFC;&#x5165;&#x52A0;&#x8F7D;">&#x65E0;&#x5BFC;&#x5165;&#x52A0;&#x8F7D;</h3>
<p>&quot;&#x65E0;&#x5BFC;&#x5165;&#x52A0;&#x8F7D;&quot; &#x53EF;&#x4EE5;&#x88AB;&#x7528;&#x6765;&#x52A0;&#x8F7D;&#x67D0;&#x4E9B;&#x53EA;&#x9700;&#x8981;&#x5176;&#x526F;&#x4F5C;&#x7528;&#x7684;&#x6A21;&#x5757;.</p>
<pre><code class="lang-ts"><span class="hljs-keyword">import</span> <span class="hljs-string">&quot;./polyfills&quot;</span>;
</code></pre>
<p>&#x4E86;&#x89E3;&#x66F4;&#x591A;&#x5173;&#x4E8E;&#x6A21;&#x5757;&#x7684;&#x4FE1;&#x606F;, &#x8BF7;&#x53C2;&#x89C1; <a href="https://github.com/Microsoft/TypeScript/issues/2242" target="_blank">ES6 &#x6A21;&#x5757;&#x652F;&#x6301;&#x89C4;&#x8303;</a>.</p>
<h2 id="&#x58F0;&#x660E;&#x4E0E;&#x8D4B;&#x503C;&#x7684;&#x89E3;&#x6784;">&#x58F0;&#x660E;&#x4E0E;&#x8D4B;&#x503C;&#x7684;&#x89E3;&#x6784;</h2>
<p>TypeScript 1.5 &#x6DFB;&#x52A0;&#x4E86;&#x5BF9; ES6 &#x89E3;&#x6784;&#x58F0;&#x660E;&#x4E0E;&#x8D4B;&#x503C;&#x7684;&#x652F;&#x6301;.</p>
<h3 id="&#x89E3;&#x6784;">&#x89E3;&#x6784;</h3>
<p>&#x89E3;&#x6784;&#x58F0;&#x660E;&#x4F1A;&#x5F15;&#x5165;&#x4E00;&#x4E2A;&#x6216;&#x591A;&#x4E2A;&#x547D;&#x540D;&#x53D8;&#x91CF;, &#x5E76;&#x4E14;&#x521D;&#x59CB;&#x5316;&#x5B83;&#x4EEC;&#x7684;&#x503C;&#x4E3A;&#x5BF9;&#x8C61;&#x7684;&#x5C5E;&#x6027;&#x6216;&#x8005;&#x6570;&#x7EC4;&#x7684;&#x5143;&#x7D20;&#x5BF9;&#x5E94;&#x7684;&#x503C;.</p>
<p>&#x6BD4;&#x5982;&#x8BF4;, &#x4E0B;&#x9762;&#x7684;&#x4F8B;&#x5B50;&#x58F0;&#x660E;&#x4E86;&#x53D8;&#x91CF; <code>x</code>, <code>y</code> &#x548C; <code>z</code>, &#x5E76;&#x4E14;&#x5206;&#x522B;&#x5C06;&#x5B83;&#x4EEC;&#x7684;&#x503C;&#x521D;&#x59CB;&#x5316;&#x4E3A; <code>getSomeObject().x</code>, <code>getSomeObject().y</code> &#x548C; <code>getSomeObject().z</code>:</p>
<pre><code class="lang-ts"><span class="hljs-keyword">var</span> { x, y, z } = getSomeObject();
</code></pre>
<p>&#x89E3;&#x6784;&#x58F0;&#x660E;&#x4E5F;&#x53EF;&#x4EE5;&#x7528;&#x4E8E;&#x4ECE;&#x6570;&#x7EC4;&#x4E2D;&#x5F97;&#x5230;&#x503C;.</p>
<pre><code class="lang-ts"><span class="hljs-keyword">var</span> [x, y, z = <span class="hljs-number">10</span>] = getSomeArray();
</code></pre>
<p>&#x76F8;&#x4F3C;&#x7684;, &#x89E3;&#x6784;&#x53EF;&#x4EE5;&#x7528;&#x5728;&#x51FD;&#x6570;&#x7684;&#x53C2;&#x6570;&#x58F0;&#x660E;&#x4E2D;:</p>
<pre><code class="lang-ts">function drawText({ text = &quot;&quot;, location: [x, y] = [0, 0], bold = false }) {
    // &#x753B;&#x51FA;&#x6587;&#x672C;
}

// &#x4EE5;&#x4E00;&#x4E2A;&#x5BF9;&#x8C61;&#x5B57;&#x9762;&#x91CF;&#x4E3A;&#x53C2;&#x6570;&#x8C03;&#x7528; drawText
var item = { text: &quot;someText&quot;, location: [1,2,3], style: &quot;italics&quot; };
drawText(item);
</code></pre>
<h3 id="&#x8D4B;&#x503C;">&#x8D4B;&#x503C;</h3>
<p>&#x89E3;&#x6784;&#x4E5F;&#x53EF;&#x4EE5;&#x88AB;&#x7528;&#x4E8E;&#x666E;&#x901A;&#x7684;&#x8D4B;&#x503C;&#x8868;&#x8FBE;&#x5F0F;. &#x4E3E;&#x4F8B;&#x6765;&#x8BB2;, &#x4EA4;&#x6362;&#x4E24;&#x4E2A;&#x53D8;&#x91CF;&#x7684;&#x503C;&#x53EF;&#x4EE5;&#x88AB;&#x5199;&#x4F5C;&#x4E00;&#x4E2A;&#x89E3;&#x6784;&#x8D4B;&#x503C;:</p>
<pre><code class="lang-ts"><span class="hljs-keyword">var</span> x = <span class="hljs-number">1</span>;
<span class="hljs-keyword">var</span> y = <span class="hljs-number">2</span>;
[x, y] = [y, x];
</code></pre>
<h2 id="namespace-&#x547D;&#x540D;&#x7A7A;&#x95F4;-&#x5173;&#x952E;&#x5B57;"><code>namespace</code> (&#x547D;&#x540D;&#x7A7A;&#x95F4;) &#x5173;&#x952E;&#x5B57;</h2>
<p>&#x8FC7;&#x53BB; TypeScript &#x4E2D; <code>module</code> &#x5173;&#x952E;&#x5B57;&#x65E2;&#x53EF;&#x4EE5;&#x5B9A;&#x4E49; &quot;&#x5185;&#x90E8;&#x6A21;&#x5757;&quot;, &#x4E5F;&#x53EF;&#x4EE5;&#x5B9A;&#x4E49; &quot;&#x5916;&#x90E8;&#x6A21;&#x5757;&quot;; &#x8FD9;&#x8BA9;&#x521A;&#x521A;&#x63A5;&#x89E6; TypeScript &#x7684;&#x5F00;&#x53D1;&#x8005;&#x6709;&#x4E9B;&#x56F0;&#x60D1;. &quot;&#x5185;&#x90E8;&#x6A21;&#x5757;&quot; &#x7684;&#x6982;&#x5FF5;&#x66F4;&#x63A5;&#x8FD1;&#x4E8E;&#x5927;&#x90E8;&#x5206;&#x4EBA;&#x773C;&#x4E2D;&#x7684;&#x547D;&#x540D;&#x7A7A;&#x95F4;; &#x800C; &quot;&#x5916;&#x90E8;&#x6A21;&#x5757;&quot; &#x5BF9;&#x4E8E; JS &#x6765;&#x8BB2;, &#x73B0;&#x5728;&#x4E5F;&#x5C31;&#x662F;&#x6A21;&#x5757;&#x4E86;.</p>
<blockquote>
<p>&#x6CE8;&#x610F;: &#x4E4B;&#x524D;&#x5B9A;&#x4E49;&#x5185;&#x90E8;&#x6A21;&#x5757;&#x7684;&#x8BED;&#x6CD5;&#x4F9D;&#x7136;&#x88AB;&#x652F;&#x6301;.</p>
</blockquote>
<p><strong>&#x4E4B;&#x524D;</strong>:</p>
<pre><code class="lang-ts"><span class="hljs-keyword">module</span> Math {
    <span class="hljs-keyword">export</span> <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">add</span>(<span class="hljs-params">x, y</span>) </span>{ ... }
}
</code></pre>
<p><strong>&#x4E4B;&#x540E;</strong>:</p>
<pre><code class="lang-ts"><span class="hljs-keyword">namespace</span> <span class="hljs-built_in">Math</span> {
    <span class="hljs-keyword">export</span> <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">add</span>(<span class="hljs-params">x, y</span>) </span>{ ... }
}
</code></pre>
<h2 id="let-&#x548C;-const-&#x7684;&#x652F;&#x6301;"><code>let</code> &#x548C; <code>const</code> &#x7684;&#x652F;&#x6301;</h2>
<p>ES6 &#x7684; <code>let</code> &#x548C; <code>const</code> &#x58F0;&#x660E;&#x73B0;&#x5728;&#x652F;&#x6301;&#x7F16;&#x8BD1;&#x5230; ES3 &#x548C; ES5.</p>
<h3 id="const">Const</h3>
<pre><code class="lang-ts"><span class="hljs-keyword">const</span> MAX = <span class="hljs-number">100</span>;

++MAX; <span class="hljs-comment">// &#x9519;&#x8BEF;: &#x81EA;&#x589E;/&#x51CF;&#x8FD0;&#x7B97;&#x7B26;&#x4E0D;&#x80FD;&#x7528;&#x4E8E;&#x4E00;&#x4E2A;&#x5E38;&#x91CF;</span>
</code></pre>
<h3 id="&#x5757;&#x7EA7;&#x4F5C;&#x7528;&#x57DF;">&#x5757;&#x7EA7;&#x4F5C;&#x7528;&#x57DF;</h3>
<pre><code class="lang-ts"><span class="hljs-keyword">if</span> (<span class="hljs-literal">true</span>) {
  <span class="hljs-keyword">let</span> a = <span class="hljs-number">4</span>;
  <span class="hljs-comment">// &#x4F7F;&#x7528;&#x53D8;&#x91CF; a</span>
}
<span class="hljs-keyword">else</span> {
  <span class="hljs-keyword">let</span> a = <span class="hljs-string">&quot;string&quot;</span>;
  <span class="hljs-comment">// &#x4F7F;&#x7528;&#x53D8;&#x91CF; a</span>
}

alert(a); <span class="hljs-comment">// &#x9519;&#x8BEF;: &#x53D8;&#x91CF; a &#x5728;&#x5F53;&#x524D;&#x4F5C;&#x7528;&#x57DF;&#x672A;&#x5B9A;&#x4E49;</span>
</code></pre>
<h2 id="forof-&#x7684;&#x652F;&#x6301;"><code>for...of</code> &#x7684;&#x652F;&#x6301;</h2>
<p>TypeScript 1.5 &#x589E;&#x52A0;&#x4E86; ES6 <code>for...of</code> &#x5FAA;&#x73AF;&#x7F16;&#x8BD1;&#x5230; ES3/ES5 &#x65F6;&#x5BF9;&#x6570;&#x7EC4;&#x7684;&#x652F;&#x6301;, &#x4EE5;&#x53CA;&#x7F16;&#x8BD1;&#x5230; ES6 &#x65F6;&#x5BF9;&#x6EE1;&#x8DB3; <code>Iterator</code> &#x63A5;&#x53E3;&#x7684;&#x5168;&#x9762;&#x652F;&#x6301;.</p>
<h3 id="&#x4F8B;&#x5B50;">&#x4F8B;&#x5B50;</h3>
<p>TypeScript &#x7F16;&#x8BD1;&#x5668;&#x4F1A;&#x8F6C;&#x8BD1; <code>for...of</code> &#x6570;&#x7EC4;&#x5230;&#x5177;&#x6709;&#x8BED;&#x4E49;&#x7684; ES3/ES5 JavaScript (&#x5982;&#x679C;&#x88AB;&#x8BBE;&#x7F6E;&#x4E3A;&#x7F16;&#x8BD1;&#x5230;&#x8FD9;&#x4E9B;&#x7248;&#x672C;).</p>
<pre><code class="lang-ts"><span class="hljs-keyword">for</span> (<span class="hljs-keyword">var</span> v of expr) { }
</code></pre>
<p>&#x4F1A;&#x8F93;&#x51FA;&#x4E3A;:</p>
<pre><code class="lang-js"><span class="hljs-keyword">for</span> (<span class="hljs-keyword">var</span> _i = <span class="hljs-number">0</span>, _a = expr; _i &lt; _a.length; _i++) {
    <span class="hljs-keyword">var</span> v = _a[_i];
}
</code></pre>
<h2 id="&#x88C5;&#x9970;&#x5668;">&#x88C5;&#x9970;&#x5668;</h2>
<blockquote>
<p>TypeScript &#x88C5;&#x9970;&#x5668;&#x662F;&#x5C40;&#x57DF; <a href="https://github.com/wycats/javascript-decorators" target="_blank">ES7 &#x88C5;&#x9970;&#x5668;</a> &#x63D0;&#x6848;&#x7684;.</p>
</blockquote>
<p>&#x4E00;&#x4E2A;&#x88C5;&#x9970;&#x5668;&#x662F;:</p>
<ul>
<li>&#x4E00;&#x4E2A;&#x8868;&#x8FBE;&#x5F0F;</li>
<li>&#x5E76;&#x4E14;&#x503C;&#x4E3A;&#x4E00;&#x4E2A;&#x51FD;&#x6570;</li>
<li>&#x63A5;&#x53D7; <code>target</code>, <code>name</code>, &#x4EE5;&#x53CA;&#x5C5E;&#x6027;&#x63CF;&#x8FF0;&#x5BF9;&#x8C61;&#x4F5C;&#x4E3A;&#x53C2;&#x6570;</li>
<li>&#x53EF;&#x9009;&#x8FD4;&#x56DE;&#x4E00;&#x4E2A;&#x4F1A;&#x88AB;&#x5E94;&#x7528;&#x5230;&#x76EE;&#x6807;&#x5BF9;&#x8C61;&#x7684;&#x5C5E;&#x6027;&#x63CF;&#x8FF0;&#x5BF9;&#x8C61;</li>
</ul>
<blockquote>
<p>&#x4E86;&#x89E3;&#x66F4;&#x591A;, &#x8BF7;&#x53C2;&#x89C1; <a href="https://github.com/Microsoft/TypeScript/issues/2249" target="_blank">&#x88C5;&#x9970;&#x5668;</a> &#x63D0;&#x6848;.</p>
</blockquote>
<h3 id="&#x4F8B;&#x5B50;">&#x4F8B;&#x5B50;</h3>
<p>&#x88C5;&#x9970;&#x5668; <code>readonly</code> &#x548C; <code>enumerable(false)</code> &#x4F1A;&#x5728;&#x5C5E;&#x6027; <code>method</code> &#x6DFB;&#x52A0;&#x5230;&#x7C7B; <code>C</code> &#x4E0A;&#x4E4B;&#x524D;&#x88AB;&#x5E94;&#x7528;. &#x8FD9;&#x4F7F;&#x5F97;&#x88C5;&#x9970;&#x5668;&#x53EF;&#x4EE5;&#x4FEE;&#x6539;&#x5176;&#x5B9E;&#x73B0;, &#x5177;&#x4F53;&#x5230;&#x8FD9;&#x4E2A;&#x4F8B;&#x5B50;, &#x8BBE;&#x7F6E;&#x4E86; <code>descriptor</code> &#x4E3A; <code>writable: false</code> &#x4EE5;&#x53CA; <code>enumerable: false</code>.</p>
<pre><code class="lang-ts"><span class="hljs-keyword">class</span> C {
  @readonly
  @enumerable(<span class="hljs-literal">false</span>)
  method() { }
}

<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">readonly</span>(<span class="hljs-params">target, key, descriptor</span>) </span>{
    descriptor.writable = <span class="hljs-literal">false</span>;
}

<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">enumerable</span>(<span class="hljs-params">value</span>) </span>{
  <span class="hljs-keyword">return</span> <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">target, key, descriptor</span>) </span>{
     descriptor.enumerable = value;
  }
}
</code></pre>
<h2 id="&#x8BA1;&#x7B97;&#x5C5E;&#x6027;">&#x8BA1;&#x7B97;&#x5C5E;&#x6027;</h2>
<p>&#x4F7F;&#x7528;&#x52A8;&#x6001;&#x7684;&#x5C5E;&#x6027;&#x521D;&#x59CB;&#x5316;&#x4E00;&#x4E2A;&#x5BF9;&#x8C61;&#x53EF;&#x80FD;&#x4F1A;&#x5F88;&#x9EBB;&#x70E6;. &#x53C2;&#x8003;&#x4E0B;&#x9762;&#x7684;&#x4F8B;&#x5B50;:</p>
<pre><code class="lang-ts"><span class="hljs-keyword">type</span> NeighborMap = { [name: <span class="hljs-built_in">string</span>]: Node };
<span class="hljs-keyword">type</span> Node = { name: <span class="hljs-built_in">string</span>; neighbors: NeighborMap;}

<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">makeNode</span>(<span class="hljs-params">name: <span class="hljs-built_in">string</span>, initialNeighbor: Node</span>): <span class="hljs-title">Node</span> </span>{
    <span class="hljs-keyword">var</span> neighbors: NeighborMap = {};
    neighbors[initialNeighbor.name] = initialNeighbor;
    <span class="hljs-keyword">return</span> { name: name, neighbors: neighbors };
}
</code></pre>
<p>&#x8FD9;&#x91CC;&#x6211;&#x4EEC;&#x9700;&#x8981;&#x521B;&#x5EFA;&#x4E00;&#x4E2A;&#x5305;&#x542B;&#x4E86; neighbor-map &#x7684;&#x53D8;&#x91CF;, &#x4FBF;&#x4E8E;&#x6211;&#x4EEC;&#x521D;&#x59CB;&#x5316;&#x5B83;. &#x4F7F;&#x7528; TypeScript 1.5, &#x6211;&#x4EEC;&#x53EF;&#x4EE5;&#x8BA9;&#x7F16;&#x8BD1;&#x5668;&#x6765;&#x5E72;&#x91CD;&#x6D3B;:</p>
<pre><code class="lang-ts"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">makeNode</span>(<span class="hljs-params">name: <span class="hljs-built_in">string</span>, initialNeighbor: Node</span>): <span class="hljs-title">Node</span> </span>{
    <span class="hljs-keyword">return</span> {
        name: name,
        neighbors: {
            [initialNeighbor.name]: initialNeighbor
        }
    }
}
</code></pre>
<h2 id="&#x6307;&#x51FA;-umd-&#x548C;-system-&#x6A21;&#x5757;&#x8F93;&#x51FA;">&#x6307;&#x51FA; <code>UMD</code> &#x548C; <code>System</code> &#x6A21;&#x5757;&#x8F93;&#x51FA;</h2>
<p>&#x4F5C;&#x4E3A; <code>AMD</code> &#x548C; <code>CommonJS</code> &#x6A21;&#x5757;&#x52A0;&#x8F7D;&#x5668;&#x7684;&#x8865;&#x5145;, TypeScript &#x73B0;&#x5728;&#x652F;&#x6301;&#x8F93;&#x51FA;&#x4E3A; <code>UMD</code> (<a href="https://github.com/umdjs/umd" target="_blank">Universal Module Definition</a>) &#x548C; <a href="https://github.com/systemjs/systemjs" target="_blank"><code>System</code></a> &#x6A21;&#x5757;&#x7684;&#x683C;&#x5F0F;.</p>
<p><strong>&#x7528;&#x6CD5;</strong>:</p>
<blockquote>
<p>tsc --module umd</p>
</blockquote>
<p>&#x4EE5;&#x53CA;</p>
<blockquote>
<p>tsc --module system</p>
</blockquote>
<h2 id="unicode-&#x5B57;&#x7B26;&#x4E32;&#x7801;&#x4F4D;&#x8F6C;&#x4E49;">Unicode &#x5B57;&#x7B26;&#x4E32;&#x7801;&#x4F4D;&#x8F6C;&#x4E49;</h2>
<p>ES6 &#x4E2D;&#x5141;&#x8BB8;&#x7528;&#x6237;&#x4F7F;&#x7528;&#x5355;&#x4E2A;&#x8F6C;&#x4E49;&#x8868;&#x793A;&#x4E00;&#x4E2A; Unicode &#x7801;&#x4F4D;.</p>
<p>&#x4E3E;&#x4E2A;&#x4F8B;&#x5B50;, &#x8003;&#x8651;&#x6211;&#x4EEC;&#x9700;&#x8981;&#x8F6C;&#x4E49;&#x4E00;&#x4E2A;&#x5305;&#x542B;&#x4E86;&#x5B57;&#x7B26; &apos;&#x20BB7;&apos; &#x7684;&#x5B57;&#x7B26;&#x4E32;. &#x5728; UTF-16/USC2 &#x4E2D;, &apos;&#x20BB7;&apos; &#x88AB;&#x8868;&#x793A;&#x4E3A;&#x4E00;&#x4E2A;&#x4EE3;&#x7406;&#x5BF9;, &#x610F;&#x601D;&#x5C31;&#x662F;&#x5B83;&#x88AB;&#x7F16;&#x7801;&#x4E3A;&#x4E00;&#x5BF9; 16 &#x4F4D;&#x503C;&#x7684;&#x4EE3;&#x7801;&#x5355;&#x5143;, &#x5177;&#x4F53;&#x6765;&#x8BF4;&#x662F; <code>0xD842</code> &#x548C; <code>0xDFB7</code>. &#x4E4B;&#x524D;&#x8FD9;&#x610F;&#x5473;&#x7740;&#x4F60;&#x5FC5;&#x987B;&#x5C06;&#x8BE5;&#x7801;&#x4F4D;&#x8F6C;&#x4E49;&#x4E3A; <code>&quot;\uD842\uDFB7&quot;</code>. &#x8FD9;&#x6837;&#x505A;&#x6709;&#x4E00;&#x4E2A;&#x91CD;&#x8981;&#x7684;&#x95EE;&#x9898;, &#x5C31;&#x4E8B;&#x5F88;&#x96BE;&#x8BB2;&#x4E24;&#x4E2A;&#x72EC;&#x7ACB;&#x7684;&#x5B57;&#x7B26;&#x540C;&#x4E00;&#x4E2A;&#x4EE3;&#x7406;&#x5BF9;&#x533A;&#x5206;&#x5F00;&#x6765;.</p>
<p>&#x901A;&#x8FC7; ES6 &#x7684;&#x7801;&#x4F4D;&#x8F6C;&#x4E49;, &#x4F60;&#x53EF;&#x4EE5;&#x5728;&#x5B57;&#x7B26;&#x4E32;&#x6216;&#x6A21;&#x677F;&#x5B57;&#x7B26;&#x4E32;&#x4E2D;&#x6E05;&#x6670;&#x5730;&#x901A;&#x8FC7;&#x4E00;&#x4E2A;&#x8F6C;&#x4E49;&#x8868;&#x793A;&#x4E00;&#x4E2A;&#x786E;&#x5207;&#x7684;&#x5B57;&#x7B26;: <code>&quot;\u{20bb7}&quot;</code>. TypeScript &#x5728;&#x7F16;&#x8BD1;&#x5230; ES3/ES5 &#x65F6;&#x4F1A;&#x5C06;&#x8BE5;&#x5B57;&#x7B26;&#x4E32;&#x8F93;&#x51FA;&#x4E3A; <code>&quot;\uD842\uDFB7&quot;</code>.</p>
<h2 id="&#x6807;&#x7B7E;&#x6A21;&#x677F;&#x5B57;&#x7B26;&#x4E32;&#x7F16;&#x8BD1;&#x5230;-es3es5">&#x6807;&#x7B7E;&#x6A21;&#x677F;&#x5B57;&#x7B26;&#x4E32;&#x7F16;&#x8BD1;&#x5230; ES3/ES5</h2>
<p>TypeScript 1.4 &#x4E2D;, &#x6211;&#x4EEC;&#x6DFB;&#x52A0;&#x4E86;&#x6A21;&#x677F;&#x5B57;&#x7B26;&#x4E32;&#x7F16;&#x8BD1;&#x5230;&#x6240;&#x6709; ES &#x7248;&#x672C;&#x7684;&#x652F;&#x6301;, &#x5E76;&#x4E14;&#x652F;&#x6301;&#x6807;&#x7B7E;&#x6A21;&#x677F;&#x5B57;&#x7B26;&#x4E32;&#x7F16;&#x8BD1;&#x5230; ES6. &#x5F97;&#x76CA;&#x4E8E; <a href="https://github.com/ivogabe" target="_blank">@ivogabe</a> &#x7684;&#x5927;&#x91CF;&#x4ED8;&#x51FA;, &#x6211;&#x4EEC;&#x586B;&#x8865;&#x4E86;&#x6807;&#x7B7E;&#x6A21;&#x677F;&#x5B57;&#x7B26;&#x4E32;&#x5BF9;&#x7F16;&#x8BD1;&#x5230; ES3/ES5 &#x7684;&#x652F;&#x6301;.</p>
<p>&#x5F53;&#x7F16;&#x8BD1;&#x5230; ES3/ES5 &#x65F6;, &#x4E0B;&#x9762;&#x7684;&#x4EE3;&#x7801;:</p>
<pre><code class="lang-ts"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">oddRawStrings</span>(<span class="hljs-params">strs: TemplateStringsArray, n1, n2</span>) </span>{
    <span class="hljs-keyword">return</span> strs.raw.filter((raw, index) =&gt; index % <span class="hljs-number">2</span> === <span class="hljs-number">1</span>);
}

oddRawStrings <span class="hljs-string">`Hello \n<span class="hljs-subst">${123}</span> \t <span class="hljs-subst">${456}</span>\n world`</span>
</code></pre>
<p>&#x4F1A;&#x88AB;&#x8F93;&#x51FA;&#x4E3A;:</p>
<pre><code class="lang-ts"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">oddRawStrings</span>(<span class="hljs-params">strs, n1, n2</span>) </span>{
    <span class="hljs-keyword">return</span> strs.raw.filter(<span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">raw, index</span>) </span>{
        <span class="hljs-keyword">return</span> index % <span class="hljs-number">2</span> === <span class="hljs-number">1</span>;
    });
}
(_a = [<span class="hljs-string">&quot;Hello \n&quot;</span>, <span class="hljs-string">&quot; \t &quot;</span>, <span class="hljs-string">&quot;\n world&quot;</span>], _a.raw = [<span class="hljs-string">&quot;Hello \\n&quot;</span>, <span class="hljs-string">&quot; \\t &quot;</span>, <span class="hljs-string">&quot;\\n world&quot;</span>], oddRawStrings(_a, <span class="hljs-number">123</span>, <span class="hljs-number">456</span>));
<span class="hljs-keyword">var</span> _a;
</code></pre>
<h2 id="amd-&#x53EF;&#x9009;&#x4F9D;&#x8D56;&#x540D;&#x79F0;">AMD &#x53EF;&#x9009;&#x4F9D;&#x8D56;&#x540D;&#x79F0;</h2>
<p><code>/// &lt;amd-dependency path=&quot;x&quot; /&gt;</code> &#x4F1A;&#x544A;&#x8BC9;&#x7F16;&#x8BD1;&#x5668;&#x9700;&#x8981;&#x88AB;&#x6CE8;&#x5165;&#x5230;&#x6A21;&#x5757; <code>require</code> &#x65B9;&#x6CD5;&#x4E2D;&#x7684;&#x975E; TS &#x6A21;&#x5757;&#x4F9D;&#x8D56;; &#x7136;&#x800C;&#x5728; TS &#x4EE3;&#x7801;&#x4E2D;&#x65E0;&#x6CD5;&#x4F7F;&#x7528;&#x8FD9;&#x4E2A;&#x6A21;&#x5757;.</p>
<p>&#x65B0;&#x7684; <code>amd-dependency name</code> &#x5C5E;&#x6027;&#x5141;&#x8BB8;&#x4E3A; AMD &#x4F9D;&#x8D56;&#x4F20;&#x9012;&#x4E00;&#x4E2A;&#x53EF;&#x9009;&#x7684;&#x540D;&#x79F0;.</p>
<pre><code class="lang-ts"><span class="hljs-comment">/// &lt;amd-dependency path=&quot;legacy/moduleA&quot; name=&quot;moduleA&quot;/&gt;</span>
<span class="hljs-keyword">declare</span> <span class="hljs-keyword">var</span> moduleA:MyType
moduleA.callStuff()
</code></pre>
<p>&#x751F;&#x6210;&#x7684; JS &#x4EE3;&#x7801;:</p>
<pre><code class="lang-ts">define([<span class="hljs-string">&quot;require&quot;</span>, <span class="hljs-string">&quot;exports&quot;</span>, <span class="hljs-string">&quot;legacy/moduleA&quot;</span>], <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params"><span class="hljs-built_in">require</span>, exports, moduleA</span>) </span>{
    moduleA.callStuff()
});
</code></pre>
<h2 id="&#x901A;&#x8FC7;-tsconfigjson-&#x6307;&#x793A;&#x4E00;&#x4E2A;&#x9879;&#x76EE;">&#x901A;&#x8FC7; <code>tsconfig.json</code> &#x6307;&#x793A;&#x4E00;&#x4E2A;&#x9879;&#x76EE;</h2>
<p>&#x901A;&#x8FC7;&#x6DFB;&#x52A0; <code>tsconfig.json</code> &#x5230;&#x4E00;&#x4E2A;&#x76EE;&#x5F55;&#x6307;&#x660E;&#x8FD9;&#x662F;&#x4E00;&#x4E2A; TypeScript &#x9879;&#x76EE;&#x7684;&#x6839;&#x76EE;&#x5F55;. <code>tsconfig.json</code> &#x6587;&#x4EF6;&#x6307;&#x5B9A;&#x4E86;&#x6839;&#x6587;&#x4EF6;&#x4EE5;&#x53CA;&#x7F16;&#x8BD1;&#x9879;&#x76EE;&#x9700;&#x8981;&#x7684;&#x7F16;&#x8BD1;&#x5668;&#x9009;&#x9879;. &#x4E00;&#x4E2A;&#x9879;&#x76EE;&#x53EF;&#x4EE5;&#x7531;&#x4EE5;&#x4E0B;&#x65B9;&#x5F0F;&#x7F16;&#x8BD1;:</p>
<ul>
<li>&#x8C03;&#x7528; tsc &#x5E76;&#x4E0D;&#x6307;&#x5B9A;&#x8F93;&#x5165;&#x6587;&#x4EF6;, &#x6B64;&#x65F6;&#x7F16;&#x8BD1;&#x5668;&#x4F1A;&#x4ECE;&#x5F53;&#x524D;&#x76EE;&#x5F55;&#x5F00;&#x59CB;&#x5F80;&#x4E0A;&#x7EA7;&#x76EE;&#x5F55;&#x5BFB;&#x627E; <code>tsconfig.json</code> &#x6587;&#x4EF6;.</li>
<li>&#x8C03;&#x7528; tsc &#x5E76;&#x4E0D;&#x6307;&#x5B9A;&#x8F93;&#x5165;&#x6587;&#x4EF6;, &#x4F7F;&#x7528; <code>-project</code> (&#x6216;&#x8005; <code>-p</code>) &#x547D;&#x4EE4;&#x884C;&#x9009;&#x9879;&#x6307;&#x5B9A;&#x5305;&#x542B;&#x4E86; <code>tsconfig.json</code> &#x6587;&#x4EF6;&#x7684;&#x76EE;&#x5F55;.</li>
</ul>
<h3 id="&#x4F8B;&#x5B50;">&#x4F8B;&#x5B50;</h3>
<pre><code class="lang-json">{
    <span class="hljs-string">&quot;compilerOptions&quot;</span>: {
        <span class="hljs-string">&quot;module&quot;</span>: <span class="hljs-string">&quot;commonjs&quot;</span>,
        <span class="hljs-string">&quot;noImplicitAny&quot;</span>: <span class="hljs-literal">true</span>,
        <span class="hljs-string">&quot;sourceMap&quot;</span>: <span class="hljs-literal">true</span>,
    }
}
</code></pre>
<p>&#x53C2;&#x89C1; <a href="https://github.com/Microsoft/TypeScript/wiki/tsconfig.json" target="_blank">tsconfig.json wiki &#x9875;&#x9762;</a> &#x67E5;&#x770B;&#x66F4;&#x591A;&#x4FE1;&#x606F;.</p>
<h2 id="-rootdir-&#x547D;&#x4EE4;&#x884C;&#x9009;&#x9879;"><code>--rootDir</code> &#x547D;&#x4EE4;&#x884C;&#x9009;&#x9879;</h2>
<p>&#x9009;&#x9879; <code>--outDir</code> &#x5728;&#x8F93;&#x51FA;&#x4E2D;&#x4F1A;&#x4FDD;&#x7559;&#x8F93;&#x5165;&#x7684;&#x5C42;&#x7EA7;&#x5173;&#x7CFB;. &#x7F16;&#x8BD1;&#x5668;&#x5C06;&#x6240;&#x6709;&#x8F93;&#x5165;&#x6587;&#x4EF6;&#x5171;&#x6709;&#x7684;&#x6700;&#x957F;&#x8DEF;&#x5F84;&#x4F5C;&#x4E3A;&#x6839;&#x8DEF;&#x5F84;; &#x5E76;&#x4E14;&#x5728;&#x8F93;&#x51FA;&#x4E2D;&#x5E94;&#x7528;&#x5BF9;&#x5E94;&#x7684;&#x5B50;&#x5C42;&#x7EA7;&#x5173;&#x7CFB;.</p>
<p>&#x6709;&#x7684;&#x65F6;&#x5019;&#x8FD9;&#x5E76;&#x4E0D;&#x662F;&#x671F;&#x671B;&#x7684;&#x7ED3;&#x679C;, &#x6BD4;&#x5982;&#x8F93;&#x5165; <code>FolderA\FolderB\1.ts</code> &#x548C; <code>FolderA\FolderB\2.ts</code>, &#x8F93;&#x51FA;&#x7ED3;&#x6784;&#x4F1A;&#x662F; <code>FolderA\FolderB\</code> &#x5BF9;&#x5E94;&#x7684;&#x7ED3;&#x6784;. &#x5982;&#x679C;&#x8F93;&#x5165;&#x4E2D;&#x65B0;&#x589E; <code>FolderA\3.ts</code> &#x6587;&#x4EF6;, &#x8F93;&#x51FA;&#x7684;&#x7ED3;&#x6784;&#x5C06;&#x7A81;&#x7136;&#x53D8;&#x4E3A; <code>FolderA\</code> &#x5BF9;&#x5E94;&#x7684;&#x7ED3;&#x6784;.</p>
<p><code>--rootDir</code> &#x6307;&#x5B9A;&#x4E86;&#x4F1A;&#x8F93;&#x51FA;&#x5BF9;&#x5E94;&#x7ED3;&#x6784;&#x7684;&#x8F93;&#x5165;&#x76EE;&#x5F55;, &#x4E0D;&#x518D;&#x901A;&#x8FC7;&#x8BA1;&#x7B97;&#x83B7;&#x5F97;.</p>
<h2 id="-noemithelpers-&#x547D;&#x4EE4;&#x884C;&#x9009;&#x9879;"><code>--noEmitHelpers</code> &#x547D;&#x4EE4;&#x884C;&#x9009;&#x9879;</h2>
<p>TypeScript &#x7F16;&#x8BD1;&#x5668;&#x5728;&#x9700;&#x8981;&#x7684;&#x65F6;&#x5019;&#x4F1A;&#x8F93;&#x51FA;&#x4E00;&#x4E9B;&#x50CF; <code>__extends</code> &#x8FD9;&#x6837;&#x7684;&#x5DE5;&#x5177;&#x51FD;&#x6570;. &#x8FD9;&#x4E9B;&#x51FD;&#x6570;&#x4F1A;&#x5728;&#x4F7F;&#x7528;&#x5B83;&#x4EEC;&#x7684;&#x6240;&#x6709;&#x6587;&#x4EF6;&#x4E2D;&#x8F93;&#x51FA;. &#x5982;&#x679C;&#x4F60;&#x60F3;&#x8981;&#x805A;&#x5408;&#x6240;&#x6709;&#x7684;&#x5DE5;&#x5177;&#x51FD;&#x6570;&#x5230;&#x540C;&#x4E00;&#x4E2A;&#x4F4D;&#x7F6E;, &#x6216;&#x8005;&#x8986;&#x76D6;&#x9ED8;&#x8BA4;&#x7684;&#x884C;&#x4E3A;, &#x4F7F;&#x7528; <code>--noEmitHelpers</code> &#x6765;&#x544A;&#x77E5;&#x7F16;&#x8BD1;&#x5668;&#x4E0D;&#x8981;&#x8F93;&#x51FA;&#x5B83;&#x4EEC;.</p>
<h2 id="-newline-&#x547D;&#x4EE4;&#x884C;&#x9009;&#x9879;"><code>--newLine</code> &#x547D;&#x4EE4;&#x884C;&#x9009;&#x9879;</h2>
<p>&#x9ED8;&#x8BA4;&#x8F93;&#x51FA;&#x7684;&#x6362;&#x884C;&#x7B26;&#x5728; Windows &#x4E0A;&#x662F; <code>\r\n</code>, &#x5728; *nix &#x4E0A;&#x662F; <code>\n</code>. <code>--newLine</code> &#x547D;&#x4EE4;&#x884C;&#x6807;&#x8BB0;&#x53EF;&#x4EE5;&#x8986;&#x76D6;&#x8FD9;&#x4E2A;&#x884C;&#x4E3A;, &#x5E76;&#x6307;&#x5B9A;&#x8F93;&#x51FA;&#x6587;&#x4EF6;&#x4E2D;&#x4F7F;&#x7528;&#x7684;&#x6362;&#x884C;&#x7B26;.</p>
<h2 id="-inlinesourcemap-and-inlinesources-&#x547D;&#x4EE4;&#x884C;&#x9009;&#x9879;"><code>--inlineSourceMap</code> and <code>inlineSources</code> &#x547D;&#x4EE4;&#x884C;&#x9009;&#x9879;</h2>
<p><code>--inlineSourceMap</code> &#x5C06;&#x5185;&#x5D4C;&#x6E90;&#x6587;&#x4EF6;&#x6620;&#x5C04;&#x5230; <code>.js</code> &#x6587;&#x4EF6;, &#x800C;&#x4E0D;&#x662F;&#x5728;&#x5355;&#x72EC;&#x7684; <code>.js.map</code> &#x6587;&#x4EF6;&#x4E2D;. <code>--inlineSources</code> &#x5141;&#x8BB8;&#x8FDB;&#x4E00;&#x6B65;&#x5C06; <code>.ts</code> &#x6587;&#x4EF6;&#x5185;&#x5BB9;&#x5305;&#x542B;&#x5230;&#x8F93;&#x51FA;&#x6587;&#x4EF6;&#x4E2D;.</p>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="TypeScript 1.6.html" class="navigation navigation-prev " aria-label="Previous page: TypeScript 1.6">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="TypeScript 1.4.html" class="navigation navigation-next " aria-label="Next page: TypeScript 1.4">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"TypeScript 1.5","level":"1.7.16","depth":2,"next":{"title":"TypeScript 1.4","level":"1.7.17","depth":2,"path":"doc/release-notes/TypeScript 1.4.md","ref":"./doc/release-notes/TypeScript 1.4.md","articles":[]},"previous":{"title":"TypeScript 1.6","level":"1.7.15","depth":2,"path":"doc/release-notes/TypeScript 1.6.md","ref":"./doc/release-notes/TypeScript 1.6.md","articles":[]},"dir":"ltr"},"config":{"plugins":[],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","author":"Patrick Zhong","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"preface.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"TypeScript Handbook","language":"zh-hans","gitbook":">3.0.0","description":"Translation of official TypeScript Handbook"},"file":{"path":"doc/release-notes/TypeScript 1.5.md","mtime":"2018-10-13T09:48:54.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-10-13T09:57:42.904Z"},"basePath":"../..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../../gitbook/gitbook.js"></script>
    <script src="../../gitbook/theme.js"></script>
    
        
        <script src="../../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

